package bomberman.client;

import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;

import javax.swing.JApplet;

/**
 * This class is the view of the boardgame.
 * Currently it is just used to test around with java applets.
 * 
 * @author Bart Verhoeven
 * @version 0.1
 *
 */
public class GameView extends JApplet {
	
	/**
	 * version id
	 */
	private static final long serialVersionUID = 1179823193625280905L;

	/**
	 * @effect	Set the BoardView and the ScoreView
	 */
	public void init() {
		super.init();
		this.setLayout(new GridBagLayout());
		setBoardView();
		setScoreView();
	}
	
	private void setScoreView() {
		GridBagConstraints c = new GridBagConstraints();
		c.fill = GridBagConstraints.BOTH;
		c.gridx = 8;
		c.gridy = 0;
		c.weightx = 2;
		c.weighty = 1;
		c.gridwidth = 2;
		
		this.add(new ScoreView(), c);
	}

	private void setBoardView() {
		GridBagConstraints c = new GridBagConstraints();
		c.fill = GridBagConstraints.BOTH;
		c.gridx = 0;
		c.gridy = 0;
		c.weightx = 8;
		c.weighty = 1;
		c.gridwidth = 8;
		
		this.add(new BoardView(8, 8), c);
	}

	/**
	 * 
	 */
	public void start() {
		super.start();
	}
	
	/**
	 * 
	 */
	public void stop() {
		super.stop();
	}
	
	/**
	 * 
	 */
	public void destroy() {
		super.destroy();
	}

}
